<template>
  <div>
    <tabbar>
      <tabbar-item id="homeLink" ref="homeLink" link="home" icon-class="icon-class">
        <icon slot="icon" name="home" scale="1.5"></icon>
        <span slot="label" class="fs">首页</span>
      </tabbar-item>
      <tabbar-item link="activity">
        <icon slot="icon" name="bars" scale="1.5"></icon>
        <span slot="label" class="fs">活动</span>
      </tabbar-item>
      <tabbar-item link="market">
        <icon slot="icon" name="shopping-basket" scale="1.5"></icon>
        <span slot="label" class="fs">市场</span>
      </tabbar-item>
      <tabbar-item link='me'>
        <icon slot="icon" name="user-circle" scale="1.5"></icon>
        <span slot="label" class="fs">我</span>
      </tabbar-item>
    </tabbar>
  </div>
</template>
<script>
import { Tabbar, TabbarItem, Group, Cell } from 'vux'
import Icon from 'vue-awesome'
export default {
  components: {
    Tabbar,
    TabbarItem,
    Group,
    Cell,
    Icon
  },
  mounted () {
    if (this.$router.history.current.path === '/home') {
      console.log('路径是一个home')
    } else if (this.$router.history.current.path === '/market') {
      console.log('路径是一个home')
    }
    console.log(this.$router)
    console.log(this.$router.history.current.path)
  },
  data () {
    return {
      index: 0
    }
  }
}
</script>
<style>
.fs{
  font-size: 12px;
}
.weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon, .weui-tabbar__item.weui-bar__item_on .weui-tabbar__icon > i, .weui-tabbar__item.weui-bar__item_on .weui-tabbar__label {
    color: rgb(216, 65, 65) !important;
}
</style>
